package cate.game.play.buff.h;

import cate.game.play.buff.Buff;
import cate.game.play.buff.BuffHandler;
import cate.game.play.fighter.Fighter;
import cate.game.play.proce.action.ctx.ActionCtx;
import cate.game.play.proce.action.ctx.TimeActionCtx;
import cate.game.play.proce.move.MoveCtx;

/**
 * 携带此状态的目标无法对星空蛋糕添加负面状态，[星眼] 会在对方使用技能后消失
 */
public class 星眼BH extends BuffHandler {

	@Override
	public boolean allowAddBuffToTarget(ActionCtx action, Fighter target, Buff buffToAdd) {
		return buffToAdd.isGood() || target.getPid() != buff.caster.getPid();
	}

	@Override
	public void onOwnerMoveDone(MoveCtx move, TimeActionCtx action) {
		buff.markInvalid(action);
	}
}
